import axios from "../../axios";

export const API_BASE = 'http://124.93.196.45:10001/';

export const dishList = (params) => {
  return axios({
    method: "get",
    url: `/api/prod-api/api/kitchen-helper/dishes/list`, headers: {
      "Authorization": window.localStorage.getItem('token')
    },
    params,
  })
}

export const dishDetail = (id) => {
  return axios({
    method: "get",
    url: `/api/prod-api/api/kitchen-helper/dishes/${id}`,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    },
  })
}
export const getMyCollectList = (params) => {
  return axios({
    method: "get",
    url: `/api/prod-api/api/kitchen-helper/dishes-collection/list`, headers: {
      "Authorization": window.localStorage.getItem('token')
    },
    params,
  })
}


export const hotKeyList = (params) => {
  return axios({
    method: "get",
    url: `/api/prod-api/api/kitchen-helper/dishes/hot-keywords`,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    },
    params,
  })
}

export const likeDish = (data) => {
  return axios({
    method: "post",
    url: `/api/prod-api/api/kitchen-helper/dishes-like`,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    },
    data,
  })
}
export const collectDish = (data) => {
  return axios({
    method: "post",
    url: `/api/prod-api/api/kitchen-helper/dishes-collection`,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    },
    data,
  })
}